'''
Created on 09/04/2013

@author: tsantana
'''

from thilux_models import Role, Menu, MenuItem, Department, Permission
import logging

def start_data_creation():
    
    pass
    '''permission_names = ('Manager', 'SalesPerson', 'BasicEmployee')
    
    for permission_name in permission_names:
        permission = Permission(key_name=permission_name)
        permission.put()
        logging.info('Creating PERMISSION %s' % permission_name)
        
    role_names=(('Department Manager', 'Manager'), ('Sales Person', 'SalesPerson'), ('Employee', 'BasicEmployee'))
    
    for role_name in role_names:
        role=Role(key_name=role_name[0])
        role.permission=Permission.get_by_key_name(role_name[1])
        role.put()    
        logging.info('Creating ROLE %s' % role_name[0])

    role = Role.get_by_key_name('Department Manager')
    menu = Menu()
    
    menu.title='Reports'
    menu.role=role
    menu.put()
    logging.info('Creating MENU %s' % menu.title)
     
    menu_items=(('Sales Reports', '/salesreports'), ('Commissions Reports', '/commissionsreports'), ('Stock Reports', '/stocksreports'))    
    
    for menu_item in menu_items:
        item = MenuItem()
        item.menu=menu
        item.name=menu_item[0]
        item.link=menu_item[1]
        item.put()
        logging.info('Creating MENU_ITEM %s' % menu_item[0])'''
        